<?php // echo CHtml::errorSummary($model); ?>
<div style="clear: both;">
    <?php echo CHtml::beginForm('', 'post', array('class' => 'dot_form fw_50', 'enctype'=>'multipart/form-data')); ?>
    <fieldset>
        <legend><?php echo Yii::t('common', 'please_fill_table_contents'); ?></legend>
        <dl>
            <dt><?php echo CHtml::activeLabelEx($model, 'node_id'); ?></dt>
            <dd>
                <?php
                echo CHtml::activeDropDownList($model, 'node_id',
                    CHtml::listData(Node::getCurrentLevelNodes(), 'id', 'name')
                );
                ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'type'); ?></dt>
            <dd>
                <?php echo CHtml::activeDropDownList($model, 'type', Link::model()->typeOptions); ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'name'); ?></dt>
            <dd>
                <div>
                    <?php
                    echo CHtml::activeTextField($model, 'name', array(
                        'maxlength' => 200,
                        'class' => 'large'
                    ));
                    ?>
                </div>
                <?php echo CHtml::error($model, 'name'); ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'summary'); ?></dt>
            <dd>
                <div>
                    <?php
                    echo CHtml::activeTextField($model, 'summary', array(
                        'maxlength' => 200,
                        'class' => 'large'
                    ));
                    ?>
                </div>
                <?php echo CHtml::error($model, 'summary'); ?>
            </dd>
            <dt>
            <?php echo CHtml::activeLabelEx($model, 'url'); ?></dt>
            <dd>
                <div>
                    <?php
                    echo CHtml::activeTextField($model, 'url', array(
                        'maxlength' => 200,
                        'class' => 'large',
                    ));
                    ?>
                </div>
                <?php echo CHtml::error($model, 'url'); ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'target'); ?></dt>
            <dd><?php echo CHtml::activeDropDownList($model, 'target', Link::model()->targetOptions); ?></dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'logo_filename'); ?></dt>
            <dd>
                <div><?php echo CHtml::activeFileField($model, 'logo_filename'); ?></div>
                <?php echo CHtml::error($model, 'logo_filename'); ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'order_pos'); ?></dt>
            <dd>
                <div>
                    <?php
                    echo CHtml::activeTextField($model, 'order_pos', array(
                        'maxlength' => 11,
                        'class' => 'small',
                    ));
                    ?>
                </div>
                <?php echo CHtml::error($model, 'order_pos'); ?>
            </dd>
            <dt><?php echo CHtml::activeLabelEx($model, 'status'); ?></dt>
            <dd><?php echo CHtml::activeDropDownList($model, 'status', Options::statusOptions()); ?></dd>
            <dt></dt>
            <dd>
                <?php
                echo CHtml::submitButton($update
                    ? Yii::t('common', 'update') : Yii::t('common', 'save'), array(
                    'class' => 'btn'
                ));
                ?>
            </dd>
        </dl>
    </fieldset>
    <?php echo CHtml::endForm(); ?>
</div>